chore: update test strategy #237
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Our previous testing strategy relied on file snapshots, which became brittle when testing across multiple Expo versions as these generate slightly different native projects.
Previous Approach
Current Approach
Key Improvements
- Before: High precision but brittle (exact file matching)
- Now: Flexible but still thorough (structural matching)
- Before: "Does the output match exactly what we expect?"
- Now: "Does the output contain the elements required for functionality?"
- Before: Update all snapshots when Expo versions change
- Now: Tests remain valid across Expo versions unless core functionality changes
- Before: Failed tests only showed file differences
- Now: Failed tests show exactly which functional requirements weren't met
- Test only what matters for each integration point
Solution:
Implemented a comprehensive testing strategy focusing on functionality rather than exact implementation: